3.65 \(\int \frac{A+B x+C x^2}{\sqrt{a+b x} \sqrt{a c-b c x} (e+f x)} \, dx\)

Optimal. Leaf size=278 \[ \frac{\sqrt{a^2 c-b^2 c x^2} \left (A f^2-B e f+C e^2\right ) \tan ^{-1}\left (\frac{\sqrt{c} \left (a^2 f+b^2 e x\right )}{\sqrt{a^2 c-b^2 c x^2} \sqrt{b^2 e^2-a^2 f^2}}\right )}{\sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x} \sqrt{b^2 e^2-a^2 f^2}}-\frac{\sqrt{a^2 c-b^2 c x^2} (C e-B f) \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{b \sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{C \left (a^2-b^2 x^2\right )}{b^2 f \sqrt{a+b x} \sqrt{a c-b c x}} \]

[Out]

-((C*(a^2 - b^2*x^2))/(b^2*f*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])) - ((C*e - B*f)*Sq
rt[a^2*c - b^2*c*x^2]*ArcTan[(b*Sqrt[c]*x)/Sqrt[a^2*c - b^2*c*x^2]])/(b*Sqrt[c]*
f^2*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]) + ((C*e^2 - B*e*f + A*f^2)*Sqrt[a^2*c - b^2
*c*x^2]*ArcTan[(Sqrt[c]*(a^2*f + b^2*e*x))/(Sqrt[b^2*e^2 - a^2*f^2]*Sqrt[a^2*c -
 b^2*c*x^2])])/(Sqrt[c]*f^2*Sqrt[b^2*e^2 - a^2*f^2]*Sqrt[a + b*x]*Sqrt[a*c - b*c
*x])

_______________________________________________________________________________________

Rubi [A]  time = 0.916448, antiderivative size = 278, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 7, integrand size = 40, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.175 \[ \frac{\sqrt{a^2 c-b^2 c x^2} \left (A f^2-B e f+C e^2\right ) \tan ^{-1}\left (\frac{\sqrt{c} \left (a^2 f+b^2 e x\right )}{\sqrt{a^2 c-b^2 c x^2} \sqrt{b^2 e^2-a^2 f^2}}\right )}{\sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x} \sqrt{b^2 e^2-a^2 f^2}}-\frac{\sqrt{a^2 c-b^2 c x^2} (C e-B f) \tan ^{-1}\left (\frac{b \sqrt{c} x}{\sqrt{a^2 c-b^2 c x^2}}\right )}{b \sqrt{c} f^2 \sqrt{a+b x} \sqrt{a c-b c x}}-\frac{C \left (a^2-b^2 x^2\right )}{b^2 f \sqrt{a+b x} \sqrt{a c-b c x}} \]

Antiderivative was successfully verified.

[In]  Int[(A + B*x + C*x^2)/(Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(e + f*x)),x]

[Out]

-((C*(a^2 - b^2*x^2))/(b^2*f*Sqrt[a + b*x]*Sqrt[a*c - b*c*x])) - ((C*e - B*f)*Sq
rt[a^2*c - b^2*c*x^2]*ArcTan[(b*Sqrt[c]*x)/Sqrt[a^2*c - b^2*c*x^2]])/(b*Sqrt[c]*
f^2*Sqrt[a + b*x]*Sqrt[a*c - b*c*x]) + ((C*e^2 - B*e*f + A*f^2)*Sqrt[a^2*c - b^2
*c*x^2]*ArcTan[(Sqrt[c]*(a^2*f + b^2*e*x))/(Sqrt[b^2*e^2 - a^2*f^2]*Sqrt[a^2*c -
 b^2*c*x^2])])/(Sqrt[c]*f^2*Sqrt[b^2*e^2 - a^2*f^2]*Sqrt[a + b*x]*Sqrt[a*c - b*c
*x])

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 108.663, size = 219, normalized size = 0.79 \[ \frac{2 C a \operatorname{atan}{\left (\frac{\sqrt{a c - b c x}}{\sqrt{c} \sqrt{a + b x}} \right )}}{b^{2} \sqrt{c} f} - \frac{C \sqrt{a + b x} \sqrt{a c - b c x}}{b^{2} c f} - \frac{2 \left (A f^{2} - B e f + C e^{2}\right ) \operatorname{atanh}{\left (\frac{\sqrt{c} \sqrt{a + b x} \sqrt{a f + b e}}{\sqrt{a c - b c x} \sqrt{a f - b e}} \right )}}{\sqrt{c} f^{2} \sqrt{a f - b e} \sqrt{a f + b e}} - \frac{2 \left (B b f + C a f - C b e\right ) \operatorname{atan}{\left (\frac{\sqrt{a c - b c x}}{\sqrt{c} \sqrt{a + b x}} \right )}}{b^{2} \sqrt{c} f^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((C*x**2+B*x+A)/(f*x+e)/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)

[Out]

2*C*a*atan(sqrt(a*c - b*c*x)/(sqrt(c)*sqrt(a + b*x)))/(b**2*sqrt(c)*f) - C*sqrt(
a + b*x)*sqrt(a*c - b*c*x)/(b**2*c*f) - 2*(A*f**2 - B*e*f + C*e**2)*atanh(sqrt(c
)*sqrt(a + b*x)*sqrt(a*f + b*e)/(sqrt(a*c - b*c*x)*sqrt(a*f - b*e)))/(sqrt(c)*f*
*2*sqrt(a*f - b*e)*sqrt(a*f + b*e)) - 2*(B*b*f + C*a*f - C*b*e)*atan(sqrt(a*c -
b*c*x)/(sqrt(c)*sqrt(a + b*x)))/(b**2*sqrt(c)*f**2)

_______________________________________________________________________________________

Mathematica [A]  time = 0.7064, size = 238, normalized size = 0.86 \[ \frac{\frac{\sqrt{a-b x} \log (e+f x) \left (f (A f-B e)+C e^2\right )}{\sqrt{a^2 f^2-b^2 e^2}}-\frac{\sqrt{a-b x} \left (f (A f-B e)+C e^2\right ) \log \left (\sqrt{a-b x} \sqrt{a+b x} \sqrt{a^2 f^2-b^2 e^2}+a^2 f+b^2 e x\right )}{\sqrt{a^2 f^2-b^2 e^2}}+\frac{C f \sqrt{a+b x} (b x-a)}{b^2}+\frac{\sqrt{a-b x} \tan ^{-1}\left (\frac{b x}{\sqrt{a-b x} \sqrt{a+b x}}\right ) (B f-C e)}{b}}{f^2 \sqrt{c (a-b x)}} \]

Antiderivative was successfully verified.

[In]  Integrate[(A + B*x + C*x^2)/(Sqrt[a + b*x]*Sqrt[a*c - b*c*x]*(e + f*x)),x]

[Out]

((C*f*(-a + b*x)*Sqrt[a + b*x])/b^2 + ((-(C*e) + B*f)*Sqrt[a - b*x]*ArcTan[(b*x)
/(Sqrt[a - b*x]*Sqrt[a + b*x])])/b + ((C*e^2 + f*(-(B*e) + A*f))*Sqrt[a - b*x]*L
og[e + f*x])/Sqrt[-(b^2*e^2) + a^2*f^2] - ((C*e^2 + f*(-(B*e) + A*f))*Sqrt[a - b
*x]*Log[a^2*f + b^2*e*x + Sqrt[-(b^2*e^2) + a^2*f^2]*Sqrt[a - b*x]*Sqrt[a + b*x]
])/Sqrt[-(b^2*e^2) + a^2*f^2])/(f^2*Sqrt[c*(a - b*x)])

_______________________________________________________________________________________

Maple [B]  time = 0., size = 503, normalized size = 1.8 \[{\frac{1}{{b}^{2}{f}^{3}c} \left ( -A\ln \left ( 2\,{\frac{1}{fx+e} \left ({b}^{2}cex+{a}^{2}cf+\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}f \right ) } \right ){b}^{2}c{f}^{2}\sqrt{{b}^{2}c}+B\ln \left ( 2\,{\frac{1}{fx+e} \left ({b}^{2}cex+{a}^{2}cf+\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}f \right ) } \right ){b}^{2}cef\sqrt{{b}^{2}c}+B\arctan \left ({x\sqrt{{b}^{2}c}{\frac{1}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}}} \right ){b}^{2}c{f}^{2}\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}-C\ln \left ( 2\,{\frac{1}{fx+e} \left ({b}^{2}cex+{a}^{2}cf+\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}f \right ) } \right ){b}^{2}c{e}^{2}\sqrt{{b}^{2}c}-C\arctan \left ({x\sqrt{{b}^{2}c}{\frac{1}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}}} \right ){b}^{2}cef\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}-C{f}^{2}\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}\sqrt{{b}^{2}c} \right ) \sqrt{bx+a}\sqrt{-c \left ( bx-a \right ) }{\frac{1}{\sqrt{{\frac{c \left ({a}^{2}{f}^{2}-{b}^{2}{e}^{2} \right ) }{{f}^{2}}}}}}{\frac{1}{\sqrt{{b}^{2}c}}}{\frac{1}{\sqrt{-c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }}}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((C*x^2+B*x+A)/(f*x+e)/(b*x+a)^(1/2)/(-b*c*x+a*c)^(1/2),x)

[Out]

(-A*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(
1/2)*f)/(f*x+e))*b^2*c*f^2*(b^2*c)^(1/2)+B*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x^2-
a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*f)/(f*x+e))*b^2*c*e*f*(b^2*c)^(1/2)+
B*arctan((b^2*c)^(1/2)*x/(-c*(b^2*x^2-a^2))^(1/2))*b^2*c*f^2*(c*(a^2*f^2-b^2*e^2
)/f^2)^(1/2)-C*ln(2*(b^2*c*e*x+a^2*c*f+(-c*(b^2*x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*
e^2)/f^2)^(1/2)*f)/(f*x+e))*b^2*c*e^2*(b^2*c)^(1/2)-C*arctan((b^2*c)^(1/2)*x/(-c
*(b^2*x^2-a^2))^(1/2))*b^2*c*e*f*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)-C*f^2*(-c*(b^2*
x^2-a^2))^(1/2)*(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)*(b^2*c)^(1/2))*(b*x+a)^(1/2)*(-c
*(b*x-a))^(1/2)/b^2/(c*(a^2*f^2-b^2*e^2)/f^2)^(1/2)/(b^2*c)^(1/2)/f^3/c/(-c*(b^2
*x^2-a^2))^(1/2)

_______________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \[ \text{Exception raised: ValueError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*(f*x + e)),x, algorithm="maxima")

[Out]

Exception raised: ValueError

_______________________________________________________________________________________

Fricas [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*(f*x + e)),x, algorithm="fricas")

[Out]

Timed out

_______________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{A + B x + C x^{2}}{\sqrt{- c \left (- a + b x\right )} \sqrt{a + b x} \left (e + f x\right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x**2+B*x+A)/(f*x+e)/(b*x+a)**(1/2)/(-b*c*x+a*c)**(1/2),x)

[Out]

Integral((A + B*x + C*x**2)/(sqrt(-c*(-a + b*x))*sqrt(a + b*x)*(e + f*x)), x)

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.279442, size = 358, normalized size = 1.29 \[ -\frac{{\left (B \sqrt{-c} f - C \sqrt{-c} e\right )}{\rm ln}\left ({\left (\sqrt{-b c x + a c} \sqrt{-c} - \sqrt{2 \, a c^{2} +{\left (b c x - a c\right )} c}\right )}^{2}\right )}{b f^{2}{\left | c \right |}} - \frac{\sqrt{2 \, a c^{2} +{\left (b c x - a c\right )} c} \sqrt{-b c x + a c} C{\left | c \right |}}{b^{2} c^{3} f} - \frac{2 \,{\left (A \sqrt{-c} c^{2} f^{2} - B \sqrt{-c} c^{2} f e + C \sqrt{-c} c^{2} e^{2}\right )} \arctan \left (\frac{2 \, b c^{2} e +{\left (\sqrt{-b c x + a c} \sqrt{-c} - \sqrt{2 \, a c^{2} +{\left (b c x - a c\right )} c}\right )}^{2} f}{2 \, \sqrt{a^{2} f^{2} - b^{2} e^{2}} c^{2}}\right )}{\sqrt{a^{2} f^{2} - b^{2} e^{2}} c^{2} f^{2}{\left | c \right |}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((C*x^2 + B*x + A)/(sqrt(-b*c*x + a*c)*sqrt(b*x + a)*(f*x + e)),x, algorithm="giac")

[Out]

-(B*sqrt(-c)*f - C*sqrt(-c)*e)*ln((sqrt(-b*c*x + a*c)*sqrt(-c) - sqrt(2*a*c^2 +
(b*c*x - a*c)*c))^2)/(b*f^2*abs(c)) - sqrt(2*a*c^2 + (b*c*x - a*c)*c)*sqrt(-b*c*
x + a*c)*C*abs(c)/(b^2*c^3*f) - 2*(A*sqrt(-c)*c^2*f^2 - B*sqrt(-c)*c^2*f*e + C*s
qrt(-c)*c^2*e^2)*arctan(1/2*(2*b*c^2*e + (sqrt(-b*c*x + a*c)*sqrt(-c) - sqrt(2*a
*c^2 + (b*c*x - a*c)*c))^2*f)/(sqrt(a^2*f^2 - b^2*e^2)*c^2))/(sqrt(a^2*f^2 - b^2
*e^2)*c^2*f^2*abs(c))